import request from '../utils/request'
/**
 * 搜索相关接口
 */
export default {
  // 商品详情
  getGoodsDetailByGoodsId (goodsId) {
    return request({
      url: 'gds/goods/getGoodsDetailByGoodsId.do_',
      method: 'get',
      params: {goodsId}
    })
  },
  // 获取会员的折扣点
  getMemberDiscountPoint () {
    return request({
      url: 'gds/goods/getMemberDiscountPoint.do_',
      method: 'get'
    })
  },
  // 加入购物车
  addCartgoods (_propertyId, _num) {
    const data = {
      propertyId: _propertyId,
      num: _num
    }

    return request({
      url: 'order/addCartgoods.do_',
      method: 'post',
      data
    })
  },
  // 获取购物车数量
  getCartNumber () {
    return request({
      url: 'order/getCartgoodscount.do_',
      method: 'get'
    })
  }
}
